<?php

namespace mpend\modules\share\models;

use Yii;

/**
 * 班组记工本加入模型
 * 
 * @author emhome <emhome@163.com>
 * @since 1.0
 */
class ShareBook extends \common\logics\WorkbookLogic {

    /**
     * @inheritdoc
     */
    public function fields() {
        return [
            'id',
            'title',
            'thumb',
            'description',
            'headman' => function() {
                return $this->headman ? $this->headman : '未设置';
            },
            'type',
            'createdTime',
            'teamwork' => function() {
                return boolval($this->teamwork);
            },
            'memberCount',
            'recommendMembers',
            'mplink',
        ];
    }

}
